package com.autumn.sms.service.consts;

import java.util.HashMap;
import java.util.Map;

/**
 * 服务常量
 * 
 * @author 老码农
 *
 *         2018-01-12 10:53:58
 */
public class ServiceConsts {

	/**
	 * 状态
	 * 
	 * @author 老码农
	 *         <p>
	 *         Description
	 *         </p>
	 * @date 2017-12-30 20:59:31
	 */
	public static class Status {
		/**
		 * 草稿状态
		 */
		public static final int STATUS_DRAFT = 1;

		/**
		 * 发布状态
		 */
		public static final int STATUS_RELEASE = 2;

		/**
		 * 停用状态
		 */
		public static final int STATUS_DISABLE = 3;

		/**
		 * 删除状态
		 */
		public static final int STATUS_DELETED = 4;

		private final static Map<Integer, String> NAME_MAP = new HashMap<>();

		static {
			NAME_MAP.put(STATUS_DRAFT, "待发布");
			NAME_MAP.put(STATUS_RELEASE, "已发布");
			NAME_MAP.put(STATUS_DISABLE, "已停用");
			NAME_MAP.put(STATUS_DELETED, "已删除");
		}

		/**
		 * 获取名称
		 * 
		 * @param value
		 *            值
		 * @return
		 */
		public static String getName(Integer value) {
			if (value == null) {
				return null;
			}
			return NAME_MAP.get(value);
		}
	}

	/**
	 * 平台
	 * 
	 * @author 老码农
	 *
	 *         2018-01-12 18:08:37
	 */
	public static class Platform {

		/**
		 * Bean 名称前缀
		 */
		public final static String BEAN_NAME_PREFIX = "sms_platform_";

		/**
		 * 聚合
		 */
		public static final String BEAN_NAME_JUHE = BEAN_NAME_PREFIX + "juhe";

		/**
		 * 阿里云
		 */
		public static final String BEAN_NAME_ALIYUN = BEAN_NAME_PREFIX + "aliyun";

	}
}
